<%@ include file="/WEB-INF/jspf/tag-libraries.jspf"%>
<%@ taglib tagdir="/WEB-INF/tags" prefix="tf" %>
<ttjhome:rewrite var="createURL" action="/candidates/create.do?action=create" form="false" />
<ttjhome:rewrite var="listCompanyURL" action="/companies/list.do?action=list" form="false" />
<ttjhome:rewrite var="getGroupedTag" action="/tags.do?action=groupAllTags" form="false" />

<script type="text/javascript">


$(document).ready(function() {
	 var url = "${getGroupedTag}";
		$.getJSON(url, function(json){
	        if (json.result == 0) {
				   if (json.data != null) {
					  var tags = json.data;
					  $("#tagcloud").tagCloud(tags,{click:function(tag){
						  setTagsFilter(tag,true);
					  }});
	            }
	        }
	        else {
	            alert("error when getting tags");
	        }
	    });
})

</script>
<div >
		<fieldset>
		 <legend>TagCloud</legend>
			<div id="tagcloud"></div>
		<p>
   		 	</p>
		</fieldset>
		
  		<a href="${listCompanyURL}">Companies</a><br />
      	<a href="${createURL}">New Candidate</a><br />
      	
	
</div>